Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimessieve(nats(s(s(0))))

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

filter(cons(X), 0, M) → cons(0)
filter(cons(X), s(N), M) → cons(X)
sieve(cons(0)) → cons(0)
sieve(cons(s(N))) → cons(s(N))
nats(N) → cons(N)
zprimessieve(nats(s(s(0))))

Q is empty.

We use [23] with the following order to prove termination.

Recursive Path Order [2].
Precedence:
filter3 > 0
zprimes > sieve1 > cons1 > 0
zprimes > sieve1 > s1 > 0
zprimes > nats1 > cons1 > 0